#!/usr/bin/python
#coding:utf-8
#Projeto Locadora

import wx
import os


class Janela_Arquivo(wx.Dialog):
    def __init__(self, parent, id, title):
        wx.Dialog.__init__(self, parent, id, title, size=(400,300), style=wx.DEFAULT_DIALOG_STYLE)
        
        font1 = wx.Font(12, wx.BOLD, wx.NORMAL, wx.NORMAL)
        Titulo = wx.StaticText(self, -1, u'Arquivos', pos=(150, 10))
        Titulo.SetFont(font1)
        
        wx.Button(self, 1, 'CIVIL', (80, 80),(100,100))
        wx.Button(self, 2, 'PENAL', (200, 80),(100,100))
        wx.Button(self, 3, 'Sair', (300, 230))
        self.Bind(wx.EVT_BUTTON, self.OnAbrir, id=1)
        self.Bind(wx.EVT_BUTTON, self.OnAbrir, id=2)
        self.Bind(wx.EVT_BUTTON, self.OnQuit, id=3)


    def OnAbrir(self,event):
        dlg = wx.FileDialog(self, "Selecione um Arquivo", os.getcwd(), "", "*.*", wx.OPEN)
        if dlg.ShowModal() == wx.ID_OK:
            path = dlg.GetPath()
            mypath = os.path.basename(path)
            self.SetStatusText("You selected: %s" % mypath)
        dlg.Destroy() 

    def OnQuit(self, event):
        self.Destroy()